<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>演示JSON</title>
</head>
<body>
<h1>演示JSON</h1>
<script type="text/javascript">
    let json={
        "username":"root",
        "password":"123456",
        "age":20,
        "phone":"13569124",
        "email":"tom@123.com",
        "skills":["Java","JavaScript","Python","C++"],
        "department":{
            "id":12,
            "name":"Java"
        }
    };
     console.log(json.username);
     console.log(json.password);
     console.log(json.age);
     console.log(json.phone);
     console.log(json.email);
     console.log(json.skills[0]);
     console.log(json.skills[1]);
     console.log(json.skills[2]);
     console.log(json.skills[3]);
     console.log(json.department);
     console.log(json.department.id);
     console.log(json.department.name);
</script>
</body>
</html>